//
//  MoneyAchievement.cpp
//  ATM Killer
//
//  Created by USoft on 8/4/14.
//
//

#include "MoneyAchievement.h"
MoneyAchievement::MoneyAchievement(){
    this->comparedNumber = NULL;
    this->objective = NULL;
}

MoneyAchievement::~MoneyAchievement(){
    Utils::safeRelease(this->objective);
    Utils::safeRelease(this->comparedNumber);
}

bool MoneyAchievement::init() {
    this->achievementID = -1 ;
    this->name = "";
    this->description = "";
    this->type = -1;
    this->effectType = -1;
    this->effectPercent = 0.0f;
    return true;
}

bool MoneyAchievement::examine(){
    if (this->comparedNumber->compare(this->objective) >= 0){
        this->status = NUM_STATUS_UNLOCKED;
        return true;
    } else {
        return false;
    }
}
